package src.cn.hquanheng.java_base.day19;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class DemoCP {
	public static void main(String[] args) {
		ExecutorService pool = Executors.newFixedThreadPool(2);
		
		Factory f = new Factory();
		
		pool.execute(new Producter(f));
		pool.execute(new Consumer(f));
		
		pool.shutdown();
		
	}
}
